package com.jhgsys.internal.peccancy.service;

import com.jhgsys.internal.common.exception.FebsException;
import com.jhgsys.internal.peccancy.dto.PeccancyInformationDto;
import com.jhgsys.internal.peccancy.dto.PeccancyInformationQueryDto;
import com.jhgsys.internal.peccancy.entity.PeccancyInformation;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 违章登记 Service接口
 *
 * @author wanghw
 * @date 2024-08-12 09:46:29
 */
public interface IPeccancyInformationService extends IService<PeccancyInformation> {
    /**
     * 查询（分页）
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param request QueryRequest
     * @param peccancyInformation peccancyInformation
     * @return IPage<PeccancyInformation>
     */
    IPage<PeccancyInformation> findPeccancyInformationPage(QueryRequest request, PeccancyInformationQueryDto peccancyInformation);

    /**
     * 查询（分页） 外加枚举值组装
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param request QueryRequest
     * @param peccancyInformation peccancyInformation
     * @return IPage<PeccancyInformation>
     */
    IPage<PeccancyInformationDto> findPeccancyInformationDtoPage(QueryRequest request, PeccancyInformationQueryDto peccancyInformation);

    /**
     * 查询（所有）
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param peccancyInformation peccancyInformation
     * @return List<PeccancyInformation>
     */
    List<PeccancyInformation> findPeccancyInformationList(PeccancyInformation peccancyInformation);

    /**
    * 根据ID查询
    * @author wanghw
    * @date 2024-08-12 09:46:29
    * @param id
    * @return PeccancyInformation
    */
    PeccancyInformation findPeccancyInformationById(String id);

    /**
     * 根据ID查询 获取dto
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param id
     * @return PeccancyInformation
     */
    PeccancyInformationDto findPeccancyInformationDtoById(String id);

    /**
     * 新增
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param peccancyInformation peccancyInformation
     */
    @Transactional(rollbackFor = Exception.class)
    void createPeccancyInformation(PeccancyInformationDto peccancyInformation) throws FebsException;

    /**
     * 修改
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param peccancyInformation peccancyInformation
     */
    void updatePeccancyInformation(PeccancyInformation peccancyInformation);


    @Transactional(rollbackFor = Exception.class)
    void updatePeccancyInformationDto(PeccancyInformationDto peccancyInformation) throws FebsException;


    void auditPeccancyInformation(PeccancyInformation peccancyInformation,String oriStatus) throws FebsException;



    void issuancePeccancyInformation(PeccancyInformation peccancyInformation) throws FebsException;


    /**
     * 违章罚款线下支付
     * @param peccancyInformation
     */
    void informationOffLinePay(PeccancyInformation peccancyInformation);





    /**
     * 逻辑删除
     * @author wanghw
     * @date 2024-08-12 09:46:29
     * @param peccancyInformation peccancyInformation
     * @param peccancyInformationIds peccancyInformationIds
     */
    void deletePeccancyInformation(PeccancyInformation peccancyInformation,String peccancyInformationIds);

    /**
    * 物理删除
    * @author wanghw
    * @date 2024-08-12 09:46:29
    * @param peccancyInformationIds peccancyInformationIds
    */
    void physicallyDeletePeccancyInformation(String peccancyInformationIds);

    String createPeccancyNo(String tenantId,String deptId);

    /**
     * 统计用户当年违章扣钱，扣分，次数 等情况
     *
     * @return
     */
    Map<String,Object> countPeccancyByUserId(PeccancyInformationDto peccancyInformation);

    /**
     * 统计某开单人，当年总计开单罚款金额，罚款积分
     * @param inVoiceuserId
     * @return
     */
    Map<String,Object> countPeccancyByInvoiceUserId(String inVoiceuserId);
}
